package com.robot.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.robot.dao.dto.LargeMarketDTO;
import com.robot.dao.entity.IntegralLog;
import com.robot.dao.vo.IconVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface IntegralLogMapper extends BaseMapper<IntegralLog> {
    @Select("select SUM(integral_score) from integral_log where robot_id = #{robotId} ")
    Long sumIntegralLogByRobotId(@Param("robotId") Long robotId);


    Long integralUsage(Long integralId);

    List<IconVO> integralTrend(LargeMarketDTO largeMarketDTO);

    List<IconVO> integralFrequency(LargeMarketDTO largeMarketDTO);

}